package com.qf.fmall2203.productparam.controller;

import com.qf.fmall2203.productparam.entity.ProductParams;
import com.qf.fmall2203.productparam.service.IProductParamsService;
import com.qf.fmall2203.utils.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 商品参数  前端控制器
 * </p>
 *
 * @author CM
 * @since 2023-02-14
 */
@RestController
@RequestMapping("/product")
@CrossOrigin
public class ProductParamsController {

    @Autowired
    IProductParamsService iProductParamsService;

    @GetMapping("/detail-params/{id}")
    public ResultVo getProParam(@PathVariable("id") Integer id){

        ProductParams productParams = iProductParamsService.getById(id);

        return ResultVo.ok(productParams);

    }

}
